#! /bin/bash
# A simple script that changes the brightness of the microphone indicator on window managers on huawei laptops
#stateraw=$(light -Gs sysfs/leds/platform::micmute)
#state=${stateraw%.*}
stateraw=$(pamixer --default-source --get-volume-human)
state=$(echo $stateraw | rev | cut -c 2- | rev)
if [[ $stateraw -eq "muted" ]]; then
	echo "0" > /sys/class/leds/platform::micmute/brightness
else
	echo "100" > /sys/class/leds/platform::micmute/brightness
fi

